//引入express模块
const express = require('express');
//创建路由
const router = express.Router();
//引入articleCtrl.js模块
const ctrl = require('../ctrl/articleCtrl.js');
//监听请求
router.get('/article/add',ctrl.showAdd);
router.post('/article/addArticle',ctrl.addArticle);
router.get('/article/info/:id',ctrl.showInfo);
router.get('/article/edit/:id',ctrl.showEdit);
router.post('/article/editArticle',ctrl.editArticle);
//导出路由
module.exports = router;